<!DOCTYPE html>
<html>

<div th:replace="common/jsCssRef :: jsfJsCssRef"></div>

<body class="bgf6">

<div th:replace="common/head :: jsfHeader"></div>

<div class="main-body pb100">
    <div class="container pt10">
        <div class="dflx sbt">

            <div th:replace="common/left :: jsfLeft"></div>

            <div class="body-right" id="app">
                <div class="bread-nav bgff">
                    <ul class="dflx">
                        <li><a href="">首页</a></li>
                        <li><a href="">统筹规划</a></li>
                        <li><a href="">中长期项目库</a></li>
                        <li><a href="">新增</a></li>
                    </ul>
                </div>

                <div class="bgff mt10 pb20 edit-mode">
                    <form class="wrap" id="form">

                        <div class="box">
                            <div class="box-title"><span>中长期项目基本信息</span></div>
                            <div class="mt20 f14 long">
                                <div class="two">
                                    <span class="title"> 项目名称</span>
                                    <div class="content">
                                        <input type="text" id="projectName" name="projectName" class="form-control"
                                               value=""
                                               placeholder="请输入项目名称"/>
                                    </div>
                                    <span class="title">项目编号</span>
                                    <div class="content">
                                        <input type="text" id="projectNo" name="projectNo" class="form-control" value=""
                                               placeholder="请输入项目编号"/>
                                    </div>
                                </div>

                                <div class="two">
                                    <span class="title">项目编码</span>
                                    <div class="content">
                                        <input type="text" id="uniqueCityCode" name="uniqueCityCode"
                                               class="form-control" value=""
                                               placeholder="请输入项目编号"/>
                                    </div>
                                    <span class="title">项目总投资</span>
                                    <div class="content">
                                        <input type="text" id="totalProjectInvestment" name="totalProjectInvestment"
                                               class="form-control" value=""
                                               placeholder="单位为万元"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title">项目类型</span>
                                    <div class="content">
                                        <select id="project" name="projectCategoryName" class="form-control c999">
                                            <option value='' disabled selected class='none'>请选择项目类型</option>
                                            <option value="1">全市</option>
                                            <option value="2">专项</option>
                                        </select>
                                    </div>
                                    <span class="title">建设地点</span>
                                    <div class="content">
                                        <input type="text" id="constructionSite" name="constructionSite"
                                               class="form-control" value=""
                                               placeholder="建设地点"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title">计划开始时间</span>
                                    <div class="content">
                                        <div class="input-group">
                                            <input type="text" name="planBeginTime" class="form-control"
                                                   placeholder="请选择年份"
                                                   id="planBeginTime" value="">
                                        </div>
                                    </div>
                                    <span class="title">计划截止时间</span>
                                    <div class="content">
                                        <div class="input-group">
                                            <input type="text" name="planEndTime" class="form-control"
                                                   placeholder="请选择年份" id="planEndTime"
                                                   value="">
                                        </div>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title">所属单位</span>
                                    <div class="content">
                                        <select id="belongUnitName" name="belongUnitName" class="form-control c999">
                                            <option value='' disabled selected class='none'>所属编制单位</option>
                                            <option value="1">民政局</option>
                                            <option value="2">公安局</option>
                                        </select>
                                    </div>
                                    <span class="title">项目联系人</span>
                                    <div class="content">
                                        <input type="text" id="projectContact" name="projectContact"
                                               class="form-control" value=""
                                               placeholder="联系人"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title">联系人电话</span>
                                    <div class="content">
                                        <input type="text" id="projectContactMobile" name="projectContactMobile"
                                               class="form-control" value=""
                                               placeholder="请输入项目联系人电话"/>
                                    </div>
                                    <span class="title">联系人邮箱</span>
                                    <div class="content">
                                        <input type="text" id="projectContactEmail" name="projectContactEmail"
                                               class="form-control" value=""
                                               placeholder="请输入项目联系人电话"/>
                                    </div>
                                </div>

                                <div class="two">
                                    <span class="title"> 国标行业编码</span>
                                    <div class="content">
                                        <select id="prjIndustry" name="industryCoding" class="form-control c999">
                                            <option value='' disabled selected class='none'>所属编制单位</option>
                                            <option value="1">民政局</option>
                                            <option value="2">公安局</option>
                                        </select>
                                    </div>

                                    <span class="title"> 国标行业名称</span>
                                    <div class="content">
                                        <input type="text" name="industryName" class="form-control" value=""
                                               placeholder="请输入国标行业名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 是否开发区项目</span>
                                    <div class="content">
                                        <select name="isDevelopment" class="form-control c999">
                                            <option value='' disabled selected class='none'>所属编制单位</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 开发区名称</span>
                                    <div class="content">
                                        <input type="text" name="developmentName" class="form-control" value=""
                                               placeholder="请输入开发区名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 产业结构编码</span>
                                    <div class="content">
                                        <select name="industrialStructureCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>产业结构编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 产业结构名称</span>
                                    <div class="content">
                                        <input type="text" name="industrialStructureName" class="form-control" value=""
                                               placeholder="请输入产业结构名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 行政区划编码</span>
                                    <div class="content">
                                        <select name="administrativeDivisionCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>行政区划编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 行政区划名称</span>
                                    <div class="content">
                                        <input type="text" name="administrativeDivisionName" class="form-control"
                                               value="" placeholder="请输入产业结构名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 工程分类编码</span>
                                    <div class="content">
                                        <select name="projectClassificationCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>工程分类编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 工程分类名称</span>
                                    <div class="content">
                                        <input type="text" name="projectClassificationName" class="form-control"
                                               value="" placeholder="请输入工程分类名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 立项类型编码</span>
                                    <div class="content">
                                        <select name="approvalTypeCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>立项类型编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 立项类型名称</span>
                                    <div class="content">
                                        <input type="text" name="approvalTypeName" class="form-control" value=""
                                               placeholder="请输入立项类型名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 项目资金属性编码</span>
                                    <div class="content">
                                        <select name="fundAttributeCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>项目资金属性编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 项目资金属性名称</span>
                                    <div class="content">
                                        <input type="text" name="fundAttributeName" class="form-control" value=""
                                               placeholder="请输入项目资金属性名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 项目建设性质编码</span>
                                    <div class="content">
                                        <select name="constructionNatureCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>项目建设性质编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 项目建设性质名称</span>
                                    <div class="content">
                                        <input type="text" name="constructionNatureName" class="form-control" value=""
                                               placeholder="请输入项目建设性质名称"/>
                                    </div>
                                </div>
                                <div class="two">
                                    <span class="title"> 项目类别编码</span>
                                    <div class="content">
                                        <select name="itemCategoryCode" class="form-control c999">
                                            <option value='' disabled selected class='none'>项目类别编码</option>
                                            <option value="1">是</option>
                                            <option value="2">否</option>
                                        </select>
                                    </div>
                                    <span class="title"> 项目类别名称</span>
                                    <div class="content">
                                        <input type="text" name="itemCategoryName" class="form-control" value=""
                                               placeholder="请输入项目类别名称"/>
                                    </div>
                                </div>
                                <div class="one">
                                    <span class="title fj">上传附件</span>
                                    <div class="content">
                                        <input type="file" class="filestyle" data-input="false" id="filestyle-1"
                                               tabindex="-1"
                                               style="position: absolute; clip: rect(0px, 0px, 0px, 0px);">
                                        <div class="bootstrap-filestyle input-group upload">
                        						<span class="group-span-filestyle" tabindex="0">
                                                    <i class="fa fa-plus" aria-hidden="true"></i>
                        							<p class="buttonText">上传附件</p>
                        						</span>
                                        </div>
                                        <p class="f12 c999 mt3 uploadText">
                                            只能上传jpg/png/word/pdf/zip/excle/ppt格式文件，文件不能超过50MB</p>
                                    </div>
                                </div>
                                <div class="one">
                                    <span class="title">建设内容</span>
                                    <div class="content">
                                            <textarea id="remark" name="remark" class="form-control" placeholder="请输入内容"
                                                      rows="" cols=""></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="tc mt40">
                                <button type="button" class="btn btn-white f12"> 取消</button>
                                <button type="button" onclick="add(2);" class="btn btn-primary f12"> 提交
                                </button>
                                <button type="button" onclick="add(1);" class="btn btn-white f12"> 保存</button>
                            </div>

                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">

        $('#midLong').addClass('active');

        var appPage = new Vue({
            el: '#app',
            data: {
                plan: {}
            },
            created: function () {
            },
            methods: {}
        })

        function add(currentState) {

            let params = $("#form").serializeObject();
            let p = {
                'currentState': currentState,
                'auditResult': -1,
                'createMode': 1,
                'isDelete': 1,
                'approvalPerson': '',
                'isApproval': 1
            };
            $.extend(params, p);
            $.ajax({
                'url': contentPath + '/mediumLongTermpm/insert',
                'dataType': 'json',
                'type': 'post',
                'contentType': 'application/json',
                'data': JSON.stringify(params),
                'success': function (result) {
                    if (result.code != 1000) {
                        alert(result.msg);
                        return;
                    }
                    appPage.$message({
                        type: 'info',
                        message: '提交成功'
                    });
                    window.location.href = '/view/toMediumlang';
                },
                'error': function (result) {
                }
            });
        }


        $('#planBeginTime').fdatepicker({format: 'yyyy-mm-dd hh:mm:ss'});
        $('#planEndTime').fdatepicker({format: 'yyyy-mm-dd hh:mm:ss'});

        $('#midLong').addClass('active');


    </script>
</body>
</html>
